package com.dianping.cat.consumer.transaction.model.entity;

import com.dianping.cat.consumer.transaction.model.BaseEntity;
import com.dianping.cat.consumer.transaction.model.IVisitor;





public class Duration
  extends BaseEntity<Duration>
{
  private int m_value;
  private int m_count;

  public Duration() {}

/* 18 */   public Duration(int value) { this.m_value = value; }




/* 23 */   public void accept(IVisitor visitor) { visitor.visitDuration(this); }



  public boolean equals(Object obj) {
/* 28 */     if (obj instanceof Duration) {
/* 29 */       Duration _o = (Duration)obj;

/* 31 */       if (getValue() != _o.getValue()) {
/* 32 */         return false;
      }

/* 35 */       return true;
    }

/* 38 */     return false;
  }


/* 42 */   public int getCount() { return this.m_count; }



/* 46 */   public int getValue() { return this.m_value; }





  public Duration incCount() {
/* 59 */     this.m_count++;
/* 60 */     return this;
  }

  public Duration incCount(int count) {
/* 64 */     this.m_count += count;
/* 65 */     return this;
  }


  public void mergeAttributes(Duration other) {
/* 70 */     assertAttributeEquals(other, "duration", "value", Integer.valueOf(this.m_value), Integer.valueOf(other.getValue()));

/* 72 */     this.m_count = other.getCount();
  }

  public Duration setCount(int count) {
/* 76 */     this.m_count = count;
/* 77 */     return this;
  }

  public Duration setValue(int value) {
/* 81 */     this.m_value = value;
/* 82 */     return this;
  }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-consumer-3.0.0.jar!/com/dianping/cat/consumer/transaction/model/entity/Duration.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */